﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using Team6_Algorithms.AidingClasses;

namespace Team6_Algorithms.Operations
{

    /// <summary>
    /// Made by Marleen Schilt
    /// Class to enable shape drawing
    /// </summary>
    public class DrawShape
    {
       
        public static Bitmap drawShape(Bitmap sourceImage, PixelPoint RightUp, PixelPoint RightDown, PixelPoint LeftUp, PixelPoint LeftDown)
        {
            Bitmap shapeDrawingImage = sourceImage;

            Graphics GraphicsObject = Graphics.FromImage(shapeDrawingImage);

            Point RightUpPoint = new Point(RightUp.xPos, RightUp.yPos);
            Point RightDownPoint = new Point(RightDown.xPos, RightDown.yPos);
            Point LeftUpPoint = new Point(LeftUp.xPos, LeftUp.yPos);
            Point LeftDownPoint = new Point(LeftDown.xPos, LeftDown.yPos);

            GraphicsObject.DrawLine(Pens.Green, RightUpPoint, RightDownPoint);
            GraphicsObject.DrawLine(Pens.Green, RightUpPoint, LeftUpPoint);
            GraphicsObject.DrawLine(Pens.Green, LeftUpPoint, LeftDownPoint);
            GraphicsObject.DrawLine(Pens.Green, LeftDownPoint, RightDownPoint);

            return shapeDrawingImage;
        }
    }
}
